package com.starinside.wp.foundation.vo;

import com.starinside.wp.domain.Feeds;
import lombok.Data;

import java.util.Date;

@Data
public class FeedsVO {
    private String uid;

    private String childrenId;

    private String place;

    private String event;

    private String title;

    private String content;

    private String images;

    private String videos;

    private String teacherName;

    private String teacherImg;

    private Integer type;

    private String typeVal;

    private String linkId;

    private Date created = new Date();

    private Boolean isPraises;

    private String url;


    public static FeedsVO of(Feeds f){
        FeedsVO feeds = new FeedsVO();
        feeds.setUid(f.getUid());
        feeds.setTeacherImg(f.getTeacherImg());
        feeds.setTeacherName(f.getTeacherName());
        feeds.setChildrenId(f.getChildrenId());
        feeds.setPlace(f.getPlace());
        feeds.setEvent(f.getEvent());
        feeds.setType(f.getType());
        feeds.setTypeVal(f.getTypeVal());
        feeds.setTitle(f.getTitle());
        feeds.setContent(f.getContent());
        feeds.setImages(f.getImages());
        feeds.setVideos(f.getVideos());
        feeds.setLinkId(f.getLinkId());
        feeds.setCreated(f.getCreated());
        feeds.setIsPraises(f.getIsPraises());
        feeds.setUrl(f.getUrl());
        return feeds;
    }
}
